#!/usr/bin/env bash

script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

export LC_ALL=C

for db in "$script_dir"/*/*modprobed.db
do
  sort "$db" | uniq > "$db.sorted"
  mv "$db.sorted" "$db"
done
